<div class="row">
{{$this->Form->create('Bot',array('url'=>array('action'=>'choosegroup'),'class'=>'form-horizontal','role'=>'form'))}}
		<div class="col-md-12">			
			<portlet return="array" return_var="groups" cache="no" limit="200" portlet="body" model="BotGroupMember" list_tpl="inner" order="role desc" conditions="user_id=$current_user_id&role[]=1&role[]=2"></portlet>
			{{if !empty($groups['datalist'])}}

				<table style="width:100%;margin-bottom:10px;"><tbody>
					<tr>
						<td><label><input type="checkbox" class="check-all" style="margin:0 0;">&nbsp;全选</label></td>
					</tr>
				{{loop $groups['datalist'] $key $item}}		
					<tr>
						<td><label><input type="checkbox" name="groupids[]" value="{{$item['BotGroupMember']['group_id']}}">{{$item['BotGroupMember']['groupname']}} </label></td>
					</tr>
				{{/loop}}
				</tbody></table>
			{{else}}
				<p>您目前还没有关联机器人的群，请与管理员联系，获取机器人内测机会</p>
			{{/if}}

			{{loop $_REQUEST $key $val}}
				<input type="hidden" name="{{$key}}" value="{{$val}}">
			{{/loop}}	
		</div>
		<div class="col-md-12  col-xs-12">			
				<div class="form-group text-center">
					<input class="btn btn-default" data-dismiss="modal" aria-hidden="true" style="width:120px" type="cancel" value="取消">
					<input class="btn btn-primary" style="width:120px" type="submit" value="提交">
				</div>
		</div>
{{$this->Form->end()}}
</div>
